require 'test/unit'
require 'unit_converter'

class UnitConverterTest < Test::Unit::TestCase
  def test_to_celcius
    assert_equal 24, UnitConverter.convert(76, "celcius")
  end

  def test_to_fahrenheit
    assert_equal 78, UnitConverter.convert(26, "fahrenheit")
  end
  
  def test_to_kilometer
    assert_equal 32.0, UnitConverter.convert(20, "kilometer")
  end

  def test_to_mile
    assert_equal 12.5, UnitConverter.convert(20, "mile")
  end
  
  def test_to_kilogram
    assert_equal 65.25, UnitConverter.convert(145, "kilogram")
  end

  def test_to_pound
    assert_equal 155.55555555555554, UnitConverter.convert(70, "pound")
  end
end